package com.software.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author wyj
 * @since 2024-04-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_observer")
public class ObserverBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    @TableField("customer_id")
    private Integer customerId;

    /**
     * 产品id
     */
    @TableField("product_id")
    private Integer productId;


    @TableField("observer_content")
    private String observerContent;

    /**
     * 上一条评论
     */
    @TableField("last_id")
    private Integer lastId;

    @TableField("is_delete")
    private Integer isDelete;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    @TableField(exist = false)
    private CustomerInfoBean customerInfoBean;

    @TableField(exist = false)
    private ProductBean productBean;


    @TableField(exist = false)
    private CustomerInfoBean replyCustomerInfoBean;
    @TableField("root_id")
    private Integer rootId;

    @TableField("reply_id")
    private Integer replyId;
}
